<?php 
include_once 'include/func.class.php';
include_once 'include/sendemail.class.php';

$action=$_GET['action'];
switch($action){
	
	case 'send':
	$content='Dear Members: Today is your birthday, Yurou Happy birthday to you!';//邮件内容
	$title='Dear Members: Today is your birthday, Yurou Happy birthday to you!';//邮件标题
	$ids=explode(',',$_GET['ids']);
	$msg = $content;
	$mailsubject = "=?UTF-8?B?".base64_encode($title)."?=";//邮件主题
	$mailbody = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'.$msg;//邮件内容
	$mailtype = "HTML";//邮件格式（HTML/TXT）,TXT为文本邮件
	##########################################
	for($i=0;$i<count($ids);$i++){
		$smtp[$i] = new smtp($smtpserver,$smtpserverport,true,$smtpuser,$smtppass);//这里面的一个true是表示使用身份验证,否则不使用身份验证.
		$smtp[$i]->debug = FALSE;   //是否显示发送的调试信息,当前为不调试
		$smtp[$i]->sendmail(webfunc_w('m_mail','member','id='.$ids[$i].''), $smtpusermail, $mailsubject, $mailbody, $mailtype);
	}
    echo 'ok';
	break;
	
}

?>